﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

using SharpSoda.Message;

namespace SharpSoda.Server
{
    [DataContract]
    public class ServerInfo
    {
        [DataMember(Name = "name")]
        public string ServerName { get; set; }
        [DataMember(Name = "type")]
        public string ServerType { get; set; }
        [DataMember(Name = "addr")]
        public string ServerAddr { get; set; }
        [DataMember(Name = "state")]
        public int ServerState { get; set; }
    }

    [DataContract]
    public class ResultMessage : JsonMessage
    {
        [DataMember(Name = "result")]
        public string Result { get; set; }

        [DataMember(Name = "error")]
        public int Error { get; set; }

        public ResultMessage()
            : base()
        {
            Result = "";
            Error = 0;
        }
    }

    [DataContract]
    public class BusinessResultMessage : BusinessMessage
    {
        [DataMember(Name = "result")]
        public string Result { get; set; }

        [DataMember(Name = "error")]
        public int Error { get; set; }

        public BusinessResultMessage()
            : base()
        {
            Result = "";
            Error = 0;
        }
    }
}
